﻿@page "/uploads"
@inject IOptionsMonitor<WebsiteOptions> SiteOptions
@inject IStringLocalizer<Uploads> Localizer

<h3>@Localizer["UploadsTitle"]</h3>

<h4>@Localizer["UploadsSubTitle"]</h4>

<p>@((MarkupString)Localizer["UploadsNote"].Value)</p>

<Pre class="no-highlight">builder.Services.Configure&lt;HubOptions&gt;(option => option.MaximumReceiveMessageSize = null);</Pre>

<DemoBlock Title="@Localizer["UploadNormalTitle"]"
           Introduction="@Localizer["UploadNormalIntro"]"
           Name="Normal"
           Demo="typeof(Demos.Uploads.UploadNormal)">
</DemoBlock>

<DemoBlock Title="@Localizer["UploadFormSettingsTitle"]"
           Introduction="@Localizer["UploadFormSettingsIntro"]"
           Name="FormSettings"
           Demo="typeof(Demos.Uploads.UploadFormSettings)">
    <ul class="ul-demo mb-3">
        <li>@((MarkupString)Localizer["UploadFormSettingsLi1"].Value)</li>
        <li>@((MarkupString)Localizer["UploadFormSettingsLi2"].Value)</li>
    </ul>
</DemoBlock>

<DemoBlock Title="@Localizer["UploadClickUploadTitle"]"
           Introduction="@Localizer["UploadClickUploadIntro"]"
           Name="ClickUpload"
           Demo="typeof(Demos.Uploads.UploadClickUpload)">
</DemoBlock>

<DemoBlock Title="@Localizer["UploadedFilesTitle"]"
           Introduction="@Localizer["UploadedFilesIntro"]"
           Name="UploadedFiles"
           Demo="typeof(Demos.Uploads.UploadedFiles)">
</DemoBlock>

<DemoBlock Title="@Localizer["UploadFolderTitle"]"
           Introduction="@Localizer["UploadFolderIntro"]"
           Name="UploadFolder"
           Demo="typeof(Demos.Uploads.UploadFolder)">
</DemoBlock>

<DemoBlock Title="@Localizer["AvatarUploadTitle"]"
           Introduction="@Localizer["AvatarUploadIntro"]"
           Name="AvatarUpload"
           Demo="typeof(Demos.Uploads.UploadAvatar)">
</DemoBlock>

<DemoBlock Title="@Localizer["UploadPreCardStyleTitle"]"
           Introduction="@Localizer["UploadPreCardStyleIntro"]"
           Name="PreCardStyle"
           Demo="typeof(Demos.Uploads.UploadPreCardStyle)">
    <p>
        <div>@((MarkupString)Localizer["UploadPreCardStyleSSR"].Value)</div>
        <div>@((MarkupString)Localizer["UploadPreCardStyleServerSide"].Value)</div>
        <div>@((MarkupString)Localizer["UploadPreCardStyleWasm"].Value)</div>
        <div>@((MarkupString)Localizer["UploadPreCardStyleWasmSide"].Value)</div>
        <div>@((MarkupString)Localizer["UploadPreCardStyleLink", SiteOptions.CurrentValue.VideoLibUrl].Value)</div>
        <div>@((MarkupString)Localizer["UploadPreCardStyleValidation"].Value)</div>
    </p>
</DemoBlock>

<DemoBlock Title="@Localizer["UploadFileIconTitle"]"
           Introduction="@Localizer["UploadFileIconIntro"]"
           Name="FileIcon"
           Demo="typeof(Demos.Uploads.UploadFileIcon)">
</DemoBlock>

<DemoBlock Title="@Localizer["UploadFileIconTemplateTitle"]"
           Introduction="@Localizer["UploadFileIconTemplateIntro"]"
           Name="IconTemplate"
           Demo="typeof(Demos.Uploads.UploadIconTemplate)">
</DemoBlock>

<DemoBlock Title="@Localizer["UploadBase64Title"]"
           Introduction="@Localizer["UploadBase64Intro"]"
           Name="Base64"
           Demo="typeof(Demos.Uploads.UploadBase64)">
</DemoBlock>

<AttributeTable Items="@GetInputAttributes()" Title="InputUpload" />

<AttributeTable Items="@GetButtonAttributes()" Title="ButtonUpload/CardUpload" />

<AttributeTable Items="@GetAvatarAttributes()" Title="AvatarUpload" />
